class Solution(object):
    def numSpecialEquivGroups(self, words):
        """
        :type words: List[str]
        :rtype: int
        """
        words = [[list(word[::2]), list(word[1::2])] for word in words]
        for i in range(len(words)):
            words[i][0].sort()
            words[i][1].sort()
        words = {''.join(word[0] + word[1]) for word in words}
        return len(words)
